package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.ImportResult;
import cn.wolfcode.qo.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface IEmployeeService {
    void saveOrUpdate(Employee employee,Long[] ids);

    void delete(Long id);

    //批量删除
    void deleteList(Long[] ids);

    Employee selectOne(Long id);

    List<Employee> selectAll();

    PageInfo<Employee> query(QueryObject qo);

    //登录判断
    Employee checkLogin (String username, String password);

    //用户名是否存在
    boolean checkUsername (String username);

    //导出文件
    Workbook exportXls(QueryObject qo);

    //导入文件
    ImportResult importXls(MultipartFile file) throws IOException;

    //禁用/恢复
    void changeStatus(Long id,boolean status);
}
